package com.example.myapplication.status2;


public class StatusInstallFailed extends Status {
    public StatusInstallFailed(StatusContext statusContext) {
        super(statusContext);
    }

    @Override
    public void doAction() {
        FileUtils.getSingleExcutor().execute(() -> {
            statusContext.setStatus(new StatusInstall(statusContext));
            statusContext.changeEvent(null);
        });
    }

    @Override
    public void translateStatus() {
        System.out.println("status - 安装失败");
        statusContext.updateView(Event.INSTALL_FAILED);
    }

    @Override
    public void eventChange(Event event) {
        doAction();
    }
}
